#include<stdio.h>
#include<stdlib.h>
#include<string.h>

typedef struct NODE{
char path[100];
struct NODE *left,*right;
int ht;
struct file_descriptor* fd;
}NODE;

/*struct file_descriptor
{
char file_name[11];
//char Location_path[30];
char file_type[5];
unsigned long int file_size;
unsigned long int start_block_address;
unsigned long int descriptor_address;
unsigned int dir_descriptors;
};

struct file_descriptor_list 
{
struct file_descriptor fdescriptor;
char fpath[100];
struct file_descriptor_list *next;
struct file_descriptor_list *prev;
};*/

//struct file_descriptor_list *FDList; 
// struct  file_descriptor* PTR ;
NODE* avl_root ;

//****************************************************

NODE* insertBST(NODE* T,char name[], struct  file_descriptor* p);
int height(NODE*);
NODE* rotateright(NODE*);
NODE* rotateleft(NODE*);
NODE* RR(NODE*);
NODE* RL(NODE*);
NODE* LL(NODE*);
NODE* LR(NODE*);
int BF(NODE*);
void preorder(NODE*);
void inorder(NODE*);
void postorder(NODE*);
int searchBST(NODE* s,char name[],int length);
void mountBST(struct file_descriptor_list* FDList);
NODE* insert_into_BST(struct  file_descriptor* fp,char path[]);
NODE* deleteBST(NODE* tree_root,char pathname[]);

//****************************************************


